package com.gopay.common.domain.bas;

import com.gopay.common.cipher.utils.SensitiveInfoUtils;

import javax.persistence.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;


/**
 * The persistent class for the BAS_BATCH_PAY_ORDER_DTL database table.
 * 
 */
@Entity
@Table(name="BAS_BATCH_PAY_ORDER_DTL")
public class BasBatchPayOrderDtl implements Serializable {
	private static final long serialVersionUID = 1L;

	private long transDtlSq;

	private long batchTaskId;

	private int bcFlag;

	private Timestamp createdTs;

	private String lastUpdTrancode;

	private Timestamp lastUpdTs;

	private String mainRecvAcct;

	private String mainRecvCustId;

	private String merId;

	private String merOrderId;

	private Timestamp merTxnTm;

	private BigDecimal orderAmt;

	private String recvBankAcctName;

	private String recvBankAcctNum;

	private String recvBankBranchName;

	private String recvBankCityCode;

	private String recvBankCityName;

	private String recvBankName;

	private String recvBankPbocNum;

	private String recvBankProvinceCode;

	private String recvBankProvinceName;

	private String recvPbocBankCode;

	private String remark1;

	private String remark2;
	
	private String splitFlag;

	private String curType;

	private String subAcctAmt;//分账退款金额
	private String subAcctIds;//分账账号
	
	private Integer settlementState;

	/**
	 * 转手动结算原因
	 */
	private String manualReason;
	/**
	 * 账户类型
	 */
	private String acctType;

	public BasBatchPayOrderDtl() {
	}
	@Id
	@SequenceGenerator(name="BAS_BATCH_PAY_ORDER_DTL_TRANSDTLSQ_GENERATOR", sequenceName="BAS_BATCH_PAY_ORDER_DTL_SEQ")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="BAS_BATCH_PAY_ORDER_DTL_TRANSDTLSQ_GENERATOR")
	@Column(name="TRANS_DTL_SQ")
	public long getTransDtlSq() {
		return this.transDtlSq;
	}

	public void setTransDtlSq(long transDtlSq) {
		this.transDtlSq = transDtlSq;
	}

	@Column(name="BATCH_TASK_ID")
	public long getBatchTaskId() {
		return this.batchTaskId;
	}

	public void setBatchTaskId(long batchTaskId) {
		this.batchTaskId = batchTaskId;
	}

	@Column(name="BC_FLAG")
	public int getBcFlag() {
		return this.bcFlag;
	}

	public void setBcFlag(int bcFlag) {
		this.bcFlag = bcFlag;
	}

	@Column(name="CREATED_TS")
	public Timestamp getCreatedTs() {
		return this.createdTs;
	}

	public void setCreatedTs(Timestamp createdTs) {
		this.createdTs = createdTs;
	}

	@Column(name="LAST_UPD_TRANCODE")
	public String getLastUpdTrancode() {
		return this.lastUpdTrancode;
	}

	public void setLastUpdTrancode(String lastUpdTrancode) {
		this.lastUpdTrancode = lastUpdTrancode;
	}

	@Column(name="LAST_UPD_TS")
	public Timestamp getLastUpdTs() {
		return this.lastUpdTs;
	}

	public void setLastUpdTs(Timestamp lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	@Column(name="MAIN_RECV_ACCT")
	public String getMainRecvAcct() {
		return this.mainRecvAcct;
	}

	public void setMainRecvAcct(String mainRecvAcct) {
		this.mainRecvAcct = mainRecvAcct;
	}

	@Column(name="MAIN_RECV_CUST_ID")
	public String getMainRecvCustId() {
		return this.mainRecvCustId;
	}

	public void setMainRecvCustId(String mainRecvCustId) {
		this.mainRecvCustId = mainRecvCustId;
	}

	@Column(name="MER_ID")
	public String getMerId() {
		return this.merId;
	}

	public void setMerId(String merId) {
		this.merId = merId;
	}

	@Column(name="MER_ORDER_ID")
	public String getMerOrderId() {
		return this.merOrderId;
	}

	public void setMerOrderId(String merOrderId) {
		this.merOrderId = merOrderId;
	}

	@Column(name="MER_TXN_TM")
	public Timestamp getMerTxnTm() {
		return this.merTxnTm;
	}

	public void setMerTxnTm(Timestamp merTxnTm) {
		this.merTxnTm = merTxnTm;
	}

	@Column(name="ORDER_AMT")
	public BigDecimal getOrderAmt() {
		return this.orderAmt;
	}

	public void setOrderAmt(BigDecimal orderAmt) {
		this.orderAmt = orderAmt;
	}

	@Column(name="RECV_BANK_ACCT_NAME")
	public String getRecvBankAcctName() {
		/**
    	 * modify by zyt，2017-2-22在程序中获取的时候进行解密操作，如果是hibernate自己调用（save等），则返回原值；
    	 */
		this.recvBankAcctName = SensitiveInfoUtils.autoReencrypt(this.recvBankAcctName);
    	return SensitiveInfoUtils.smartDecryptWithCheck(this.recvBankAcctName);
	}

	public void setRecvBankAcctName(String recvBankAcctName) {
		/**
    	 * modified by zyt，2017-2-22 判断传入字符串是否经过加密，如果是，则设置为原文，否则设置为加密后的值
    	 */
    	this.recvBankAcctName = SensitiveInfoUtils.smartEncryptWithCheck(recvBankAcctName);
	}

	@Column(name="RECV_BANK_ACCT_NUM")
	public String getRecvBankAcctNum() {
		/**
    	 * modify by zyt，2017-2-22在程序中获取的时候进行解密操作，如果是hibernate自己调用（save等），则返回原值；
    	 */
		this.recvBankAcctNum = SensitiveInfoUtils.autoReencrypt(this.recvBankAcctNum);
    	return SensitiveInfoUtils.smartDecryptWithCheck(this.recvBankAcctNum);
	}

	public void setRecvBankAcctNum(String recvBankAcctNum) {
		/**
    	 * modified by zyt，2017-2-22 判断传入字符串是否经过加密，如果是，则设置为原文，否则设置为加密后的值
    	 */
    	this.recvBankAcctNum = SensitiveInfoUtils.smartEncryptWithCheck(recvBankAcctNum);
	}

	@Column(name="RECV_BANK_BRANCH_NAME")
	public String getRecvBankBranchName() {
		return this.recvBankBranchName;
	}

	public void setRecvBankBranchName(String recvBankBranchName) {
		this.recvBankBranchName = recvBankBranchName;
	}

	@Column(name="RECV_BANK_CITY_CODE")
	public String getRecvBankCityCode() {
		return this.recvBankCityCode;
	}

	public void setRecvBankCityCode(String recvBankCityCode) {
		this.recvBankCityCode = recvBankCityCode;
	}

	@Column(name="RECV_BANK_CITY_NAME")
	public String getRecvBankCityName() {
		return this.recvBankCityName;
	}

	public void setRecvBankCityName(String recvBankCityName) {
		this.recvBankCityName = recvBankCityName;
	}

	@Column(name="RECV_BANK_NAME")
	public String getRecvBankName() {
		return this.recvBankName;
	}

	public void setRecvBankName(String recvBankName) {
		this.recvBankName = recvBankName;
	}

	@Column(name="RECV_BANK_PBOC_NUM")
	public String getRecvBankPbocNum() {
		return this.recvBankPbocNum;
	}

	public void setRecvBankPbocNum(String recvBankPbocNum) {
		this.recvBankPbocNum = recvBankPbocNum;
	}

	@Column(name="RECV_BANK_PROVINCE_CODE")
	public String getRecvBankProvinceCode() {
		return this.recvBankProvinceCode;
	}

	public void setRecvBankProvinceCode(String recvBankProvinceCode) {
		this.recvBankProvinceCode = recvBankProvinceCode;
	}

	@Column(name="RECV_BANK_PROVINCE_NAME")
	public String getRecvBankProvinceName() {
		return this.recvBankProvinceName;
	}

	public void setRecvBankProvinceName(String recvBankProvinceName) {
		this.recvBankProvinceName = recvBankProvinceName;
	}

	@Column(name="RECV_PBOC_BANK_CODE")
	public String getRecvPbocBankCode() {
		return this.recvPbocBankCode;
	}

	public void setRecvPbocBankCode(String recvPbocBankCode) {
		this.recvPbocBankCode = recvPbocBankCode;
	}

	public String getRemark1() {
		return this.remark1;
	}

	public void setRemark1(String remark1) {
		this.remark1 = remark1;
	}

	public String getRemark2() {
		return this.remark2;
	}

	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}
	@Column(name="SPLIT_FLAG")
	public String getSplitFlag() {
		return splitFlag;
	}

	public void setSplitFlag(String splitFlag) {
		this.splitFlag = splitFlag;
	}


	@Column(name = "CUR_TYPE")
	public String getCurType() {
		return curType;
	}


	public void setCurType(String curType) {
		this.curType = curType;
	}
	
	@Transient
	public Integer getSettlementState() {
		return settlementState;
	}

	public void setSettlementState(Integer settlementState) {
		this.settlementState = settlementState;
	}

	@Transient
	public String getManualReason() {
		return manualReason;
	}

	public void setManualReason(String manualReason) {
		this.manualReason = manualReason;
	}

	@Column(name = "SUB_ACCT_AMT")
	public String getSubAcctAmt() {
		return subAcctAmt;
	}

	public void setSubAcctAmt(String subAcctAmt) {
		this.subAcctAmt = subAcctAmt;
	}

	@Column(name = "SUB_ACCT_IDS")
	public String getSubAcctIds() {
		return subAcctIds;
	}

	public void setSubAcctIds(String subAcctIds) {
		this.subAcctIds = subAcctIds;
	}
	@Column(name = "ACCT_TYPE")
	public String getAcctType() {
		return acctType;
	}

	public void setAcctType(String acctType) {
		this.acctType = acctType;
	}
}